package cn.mdmbct.douyin.data.response.item;

import cn.mdmbct.douyin.common.response.DefaultResponseData;
import cn.mdmbct.douyin.common.response.DyOpenApiResponse;
import cn.mdmbct.douyin.common.response.ResponseExtra;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 获取视频基础数据返回
 *
 * @author mdmbct  mdmbct@outlook.com
 * @date 2021/3/18 15:33
 * @modified mdmbct
 * @since 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DataItemBaseRes implements DyOpenApiResponse {

    private ResponseExtra extra;

    private DataItemBaseResData data;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @EqualsAndHashCode(callSuper = true)
    public static class DataItemBaseResData extends DefaultResponseData {

        private static final long serialVersionUID = -169863658337751027L;

        private ItemCount result;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ItemCount implements Serializable {

        private static final long serialVersionUID = -384536004335964159L;

        @JSONField(name = "avg_play_duration")
        private float avgPlayDuration;

        @JSONField(name = "total_comment")
        private long totalComment;

        @JSONField(name = "total_like")
        private long totalLike;

        @JSONField(name = "total_play")
        private long totalPlay;

        @JSONField(name = "total_share")
        private long totalShare;

    }
}
